package cn.tedu.ivos2.geofence.controller;

import cn.tedu.ivos2.base.response.JsonResult;
import cn.tedu.ivos2.geofence.pojo.dto.GeofenceQuery;
import cn.tedu.ivos2.geofence.pojo.vo.GeofenceVO;
import cn.tedu.ivos2.geofence.service.GeofenceService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/v1/geofence")
public class GeofenceController {
    @Autowired
    GeofenceService geofenceService;
    @GetMapping("/select")
    public JsonResult selectGeo(GeofenceQuery geofenceQuery){
        log.debug("查询电子围栏业务：{}",geofenceQuery);
        List<GeofenceVO> list=geofenceService.selectGeo(geofenceQuery);
        return JsonResult.ok(list);
    }
}
